package com.broada.apm.utils;

import org.elasticsearch.client.Client;
import org.junit.After;
import org.junit.Before;

public abstract class AbstractESServer {
	private static EmbedESServer embedESServer;

    @Before
    public void startEmbedESServer() {
    	embedESServer = new EmbedESServer();
    }

    @After
    public void shutdownEmbedESServer() {
    	embedESServer.shutdown();
    }

    public static Client getClient() {
        return embedESServer.getClient();
    }
}
